package com.bite.bite_forum.services;

import com.bite.bite_forum.model.User;

import javax.servlet.http.HttpServletRequest;

public interface IUserService {
    void createNormalUser(User user);

    User selectByUserName(String username);

    User login(String username, String password);

    User selectById(HttpServletRequest request, Long id);

    int addArticleCountById(Long id);

    void subOneArticleCountById(Long id);

    void modifyInfo(User user);

    User selectByPrimaryKey(Long id);

    /**
     * 修改密码
     * @param id
     * @param oldPassword
     * @param newPassword
     */
    void modifyPassword(Long id, String oldPassword, String newPassword);

}
